home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 0159 / vb.zip / SEFRAMES.FRM < prev    next >
Text File  |  1995-12-17  |  15KB  |  496 lines

  1. VERSION 2.00
  2. Begin Form FrameDemo 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Frame & Background Demo"
  6.    ClientHeight    =   4410
  7.    ClientLeft      =   1635
  8.    ClientTop       =   4470
  9.    ClientWidth     =   8430
  10.    Height          =   4770
  11.    Left            =   1575
  12.    LinkTopic       =   "Form2"
  13.    MaxButton       =   0   'False
  14.    MDIChild        =   -1  'True
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   4410
  17.    ScaleWidth      =   8430
  18.    Top             =   4170
  19.    Width           =   8550
  20.    Begin HScrollBar HScroll1 
  21.       Height          =   240
  22.       Index           =   1
  23.       Left            =   4530
  24.       Max             =   140
  25.       TabIndex        =   2
  26.       Top             =   1560
  27.       Width           =   3285
  28.    End
  29.    Begin Frame Frame1 
  30.       BackColor       =   &H00C0C0C0&
  31.       Caption         =   "Picture Properties"
  32.       Height          =   1000
  33.       Left            =   3540
  34.       TabIndex        =   16
  35.       Top             =   2130
  36.       Width           =   4600
  37.       Begin OptionButton Option1 
  38.          BackColor       =   &H00C0C0C0&
  39.          Caption         =   "FramePicture"
  40.          FontBold        =   0   'False
  41.          FontItalic      =   0   'False
  42.          FontName        =   "MS Sans Serif"
  43.          FontSize        =   8.25
  44.          FontStrikethru  =   0   'False
  45.          FontUnderline   =   0   'False
  46.          Height          =   225
  47.          Index           =   0
  48.          Left            =   300
  49.          TabIndex        =   5
  50.          Top             =   300
  51.          Value           =   -1  'True
  52.          Width           =   1900
  53.       End
  54.       Begin OptionButton Option1 
  55.          BackColor       =   &H00C0C0C0&
  56.          Caption         =   "BackgroundPicture"
  57.          FontBold        =   0   'False
  58.          FontItalic      =   0   'False
  59.          FontName        =   "MS Sans Serif"
  60.          FontSize        =   8.25
  61.          FontStrikethru  =   0   'False
  62.          FontUnderline   =   0   'False
  63.          Height          =   225
  64.          Index           =   1
  65.          Left            =   300
  66.          TabIndex        =   6
  67.          Top             =   540
  68.          Width           =   1900
  69.       End
  70.       Begin PictureBox Image1 
  71.          Height          =   645
  72.          Index           =   4
  73.          Left            =   3780
  74.          Picture         =   SEFRAMES.FRX:0000
  75.          ScaleHeight     =   41
  76.          ScaleMode       =   3  'Pixel
  77.          ScaleWidth      =   41
  78.          TabIndex        =   7
  79.          Top             =   210
  80.          Width           =   645
  81.       End
  82.       Begin PictureBox Image1 
  83.          Height          =   645
  84.          Index           =   2
  85.          Left            =   3120
  86.          Picture         =   SEFRAMES.FRX:463A
  87.          ScaleHeight     =   41
  88.          ScaleMode       =   3  'Pixel
  89.          ScaleWidth      =   41
  90.          TabIndex        =   8
  91.          Top             =   210
  92.          Width           =   645
  93.       End
  94.       Begin PictureBox Image1 
  95.          Height          =   645
  96.          Index           =   0
  97.          Left            =   2460
  98.          Picture         =   SEFRAMES.FRX:8C14
  99.          ScaleHeight     =   41
  100.          ScaleMode       =   3  'Pixel
  101.          ScaleWidth      =   41
  102.          TabIndex        =   9
  103.          Top             =   210
  104.          Width           =   645
  105.       End
  106.    End
  107.    Begin Frame Frame4 
  108.       BackColor       =   &H00C0C0C0&
  109.       Caption         =   "Color Properties"
  110.       Height          =   1000
  111.       Left            =   3540
  112.       TabIndex        =   21
  113.       Top             =   3180
  114.       Width           =   4600
  115.       Begin OptionButton Option3 
  116.          BackColor       =   &H00C0C0C0&
  117.          Caption         =   "BackgroundColor"
  118.          FontBold        =   0   'False
  119.          FontItalic      =   0   'False
  120.          FontName        =   "MS Sans Serif"
  121.          FontSize        =   8.25
  122.          FontStrikethru  =   0   'False
  123.          FontUnderline   =   0   'False
  124.          Height          =   195
  125.          Index           =   1
  126.          Left            =   330
  127.          TabIndex        =   10
  128.          Top             =   540
  129.          Width           =   1900
  130.       End
  131.       Begin OptionButton Option3 
  132.          BackColor       =   &H00C0C0C0&
  133.          Caption         =   "FrameColor"
  134.          FontBold        =   0   'False
  135.          FontItalic      =   0   'False
  136.          FontName        =   "MS Sans Serif"
  137.          FontSize        =   8.25
  138.          FontStrikethru  =   0   'False
  139.          FontUnderline   =   0   'False
  140.          Height          =   195
  141.          Index           =   0
  142.          Left            =   330
  143.          TabIndex        =   11
  144.          Top             =   300
  145.          Value           =   -1  'True
  146.          Width           =   1900
  147.       End
  148.       Begin Label HColors 
  149.          BackColor       =   &H00FFFF00&
  150.          Height          =   225
  151.          Index           =   9
  152.          Left            =   3510
  153.          TabIndex        =   28
  154.          Top             =   330
  155.          Width           =   225
  156.       End
  157.       Begin Label HColors 
  158.          BackColor       =   &H000080FF&
  159.          Height          =   225
  160.          Index           =   4
  161.          Left            =   2550
  162.          TabIndex        =   12
  163.          Top             =   570
  164.          Width           =   225
  165.       End
  166.       Begin Label HColors 
  167.          BackColor       =   &H00000000&
  168.          Height          =   225
  169.          Index           =   0
  170.          Left            =   2550
  171.          TabIndex        =   17
  172.          Top             =   330
  173.          Width           =   225
  174.       End
  175.       Begin Label HColors 
  176.          BackColor       =   &H00808080&
  177.          Height          =   225
  178.          Index           =   5
  179.          Left            =   2790
  180.          TabIndex        =   18
  181.          Top             =   570
  182.          Width           =   225
  183.       End
  184.       Begin Label HColors 
  185.          BackColor       =   &H00FFFFFF&
  186.          Height          =   225
  187.          Index           =   1
  188.          Left            =   2790
  189.          TabIndex        =   19
  190.          Top             =   330
  191.          Width           =   225
  192.       End
  193.       Begin Label HColors 
  194.          BackColor       =   &H000000FF&
  195.          Height          =   225
  196.          Index           =   6
  197.          Left            =   3030
  198.          TabIndex        =   20
  199.          Top             =   570
  200.          Width           =   225
  201.       End
  202.       Begin Label HColors 
  203.          BackColor       =   &H0000FF00&
  204.          Height          =   225
  205.          Index           =   2
  206.          Left            =   3030
  207.          TabIndex        =   25
  208.          Top             =   330
  209.          Width           =   225
  210.       End
  211.       Begin Label HColors 
  212.          BackColor       =   &H0000FFFF&
  213.          Height          =   225
  214.          Index           =   7
  215.          Left            =   3270
  216.          TabIndex        =   24
  217.          Top             =   570
  218.          Width           =   225
  219.       End
  220.       Begin Label HColors 
  221.          BackColor       =   &H00FF0000&
  222.          Height          =   225
  223.          Index           =   3
  224.          Left            =   3270
  225.          TabIndex        =   23
  226.          Top             =   330
  227.          Width           =   225
  228.       End
  229.       Begin Label HColors 
  230.          BackColor       =   &H00FF00FF&
  231.          Height          =   225
  232.          Index           =   8
  233.          Left            =   3510
  234.          TabIndex        =   22
  235.          Top             =   570
  236.          Width           =   225
  237.       End
  238.    End
  239.    Begin Frame Frame2 
  240.       BackColor       =   &H00C0C0C0&
  241.       Caption         =   "FrameStyle"
  242.       Height          =   1095
  243.       Left            =   3480
  244.       TabIndex        =   13
  245.       Top             =   0
  246.       Width           =   1575
  247.       Begin OptionButton Option2 
  248.          BackColor       =   &H00C0C0C0&
  249.          Caption         =   "Rectangle"
  250.          Height          =   225
  251.          Index           =   2
  252.          Left            =   210
  253.          TabIndex        =   4
  254.          Top             =   750
  255.          Width           =   1245
  256.       End
  257.       Begin OptionButton Option2 
  258.          BackColor       =   &H00C0C0C0&
  259.          Caption         =   "Circle"
  260.          Height          =   225
  261.          Index           =   1
  262.          Left            =   210
  263.          TabIndex        =   15
  264.          Top             =   510
  265.          Width           =   1095
  266.       End
  267.       Begin OptionButton Option2 
  268.          BackColor       =   &H00C0C0C0&
  269.          Caption         =   "None"
  270.          Height          =   225
  271.          Index           =   0
  272.          Left            =   210
  273.          TabIndex        =   14
  274.          Top             =   270
  275.          Width           =   1125
  276.       End
  277.    End
  278.    Begin HScrollBar HScroll1 
  279.       Height          =   240
  280.       Index           =   0
  281.       Left            =   4530
  282.       Max             =   140
  283.       TabIndex        =   0
  284.       Top             =   1320
  285.       Width           =   3285
  286.    End
  287.    Begin SELECTOR Selector1 
  288.       Angle           =   270
  289.       AutoAlign       =   0   'False
  290.       AutoAngle       =   -1  'True
  291.       AutoAngleConfine=   -1  'True
  292.       AutoOffset      =   -1  'True
  293.       AutoOffsetDistance=   0
  294.       AutoOffsetStyle =   0  ' 0 - Circular 
  295.       AutoRadius      =   0.8
  296.       AutoStartAngle  =   210
  297.       AutoStopAngle   =   330
  298.       AVersion        =   0
  299.       BackgroundColor =   &H00C0C0C0&
  300.       BevelInner      =   1  ' 1 - Raised
  301.       BevelOuter      =   2  ' 2 - Inset
  302.       BevelWidth      =   2
  303.       BorderType      =   0  ' 0 - None
  304.       BorderWidth     =   2
  305.       FontID          =   0
  306.       FrameColor      =   &H00000000&
  307.       FrameScaleX     =   1.1
  308.       FrameScaleY     =   1.1
  309.       FrameStyle      =   1  ' 1 - Circle
  310.       Height          =   2955
  311.       Highlight       =   0   'False
  312.       HighlightColor  =   &H00000000&
  313.       KnobColor       =   &H00808080&
  314.       KnobOriginX     =   0
  315.       KnobOriginY     =   0
  316.       KnobRadius      =   0.6
  317.       KnobStyle       =   2  ' 2 - Complex
  318.       KnobUserDefined =   ""
  319.       Left            =   360
  320.       LineDisplay     =   0   'False
  321.       LineInnerRadius =   0.4
  322.       LineThickness   =   1
  323.       MarkUserDefined =   ""
  324.       MouseControl    =   -1  'True
  325.       OutlineAlign    =   0  ' 0 - Left 
  326.       OutlineColor    =   &H00000000&
  327.       OutlineTitle    =   ""
  328.       OutlineWidth    =   0
  329.       Radius          =   0
  330.       TabIndex        =   27
  331.       TabStop         =   0   'False
  332.       Top             =   1260
  333.       Value           =   1
  334.       Width           =   2925
  335.       XScale          =   0
  336.       YScale          =   0
  337.       ZLoad           =   SEFRAMES.FRX:D1EE
  338.    End
  339.    Begin Label Label2 
  340.       AutoSize        =   -1  'True
  341.       BackStyle       =   0  'Transparent
  342.       Caption         =   " "
  343.       Height          =   195
  344.       Index           =   1
  345.       Left            =   7860
  346.       TabIndex        =   3
  347.       Top             =   1560
  348.       Width           =   435
  349.    End
  350.    Begin Label Label1 
  351.       Alignment       =   1  'Right Justify
  352.       AutoSize        =   -1  'True
  353.       BackStyle       =   0  'Transparent
  354.       Caption         =   "FrameScaleY:"
  355.       FontBold        =   0   'False
  356.       FontItalic      =   0   'False
  357.       FontName        =   "MS Sans Serif"
  358.       FontSize        =   8.25
  359.       FontStrikethru  =   0   'False
  360.       FontUnderline   =   0   'False
  361.       Height          =   195
  362.       Index           =   1
  363.       Left            =   3510
  364.       TabIndex        =   29
  365.       Top             =   1560
  366.       Width           =   990
  367.    End
  368.    Begin Label Label1 
  369.       Alignment       =   1  'Right Justify
  370.       AutoSize        =   -1  'True
  371.       BackStyle       =   0  'Transparent
  372.       Caption         =   "FrameScaleX:"
  373.       FontBold        =   0   'False
  374.       FontItalic      =   0   'False
  375.       FontName        =   "MS Sans Serif"
  376.       FontSize        =   8.25
  377.       FontStrikethru  =   0   'False
  378.       FontUnderline   =   0   'False
  379.       Height          =   195
  380.       Index           =   0
  381.       Left            =   3510
  382.       TabIndex        =   1
  383.       Top             =   1320
  384.       Width           =   990
  385.    End
  386.    Begin Label Label2 
  387.       AutoSize        =   -1  'True
  388.       BackStyle       =   0  'Transparent
  389.       Caption         =   " "
  390.       Height          =   195
  391.       Index           =   0
  392.       Left            =   7860
  393.       TabIndex        =   26
  394.       Top             =   1320
  395.       Width           =   435
  396.    End
  397. End
  398.  
  399. Sub Form_Load ()
  400.  
  401.     hscroll1(0) = selector1.FrameScaleX * 100
  402.     hscroll1(1) = selector1.FrameScaleY * 100
  403.     option2(selector1.FrameStyle) = True
  404.  
  405. End Sub
  406.  
  407. Sub HColors_Click (index As Integer)
  408.  
  409.     If option3(0) Then
  410.         selector1.FrameColor = hcolors(index).BackColor
  411.         selector1.FramePicture = LoadPicture("")
  412.     Else
  413.         selector1.BackgroundColor = hcolors(index).BackColor
  414.         selector1.BackgroundPicture = LoadPicture("")
  415.     End If
  416.  
  417. End Sub
  418.  
  419. Sub HScroll1_Change (index As Integer)
  420.  
  421.     Select Case index
  422.         Case 0
  423.             selector1.FrameScaleX = hscroll1(0) / 100
  424.             label2(0) = hscroll1(0) / 100
  425.         Case 1
  426.             selector1.FrameScaleY = hscroll1(1) / 100
  427.             label2(1) = hscroll1(1) / 100
  428.     End Select
  429.  
  430. End Sub
  431.  
  432. Sub HScroll1_Scroll (index As Integer)
  433.  
  434.     Select Case index
  435.         Case 0
  436.             selector1.FrameScaleX = hscroll1(0) / 100
  437.             label2(0) = hscroll1(0) / 100
  438.         Case 1
  439.             selector1.FrameScaleY = hscroll1(1) / 100
  440.             label2(1) = hscroll1(1) / 100
  441.     End Select
  442.  
  443. End Sub
  444.  
  445. Sub Image1_Click (index As Integer)
  446.  
  447.     If option1(0) Then
  448.         selector1.FramePicture = Image1(index).Picture
  449.     Else
  450.         selector1.BackgroundPicture = Image1(index).Picture
  451.     End If
  452.  
  453. End Sub
  454.  
  455. Sub Option2_Click (index As Integer)
  456.  
  457.     selector1.FrameStyle = index
  458.     selector1 = index
  459.  
  460.     Select Case index
  461.         Case 0
  462.             label1(0).Visible = False
  463.             hscroll1(0).Visible = False
  464.             label2(0).Visible = False
  465.             
  466.             label1(1).Visible = False
  467.             hscroll1(1).Visible = False
  468.             label2(1).Visible = False
  469.         Case 1
  470.             label1(0).Visible = True
  471.             hscroll1(0).Visible = True
  472.             label2(0).Visible = True
  473.             
  474.             label1(1).Visible = False
  475.             hscroll1(1).Visible = False
  476.             label2(1).Visible = False
  477.         Case 2
  478.             label1(0).Visible = True
  479.             hscroll1(0).Visible = True
  480.             label2(0).Visible = True
  481.             
  482.             label1(1).Visible = True
  483.             hscroll1(1).Visible = True
  484.             label2(1).Visible = True
  485.     End Select
  486.  
  487. End Sub
  488.  
  489. Sub Selector1_Change ()
  490.  
  491.     selector1.FrameStyle = selector1
  492.     option2(selector1) = True
  493.  
  494. End Sub
  495.  
  496.